package com.lw.question03;

/**
 * @author LW
 * @2020/9/14 10:36
 */
public class 阶乘2 {
    public static void main(String[] args) {
        System.out.println(Factorial(5));
        System.out.println(5*4*3*2*1);
    }

    public static int Factorial(int n){
        if(n==1){
            return 1;
        }else {
            return n*Factorial(n-1);
        }
    }
}
